Integrand size = 21, antiderivative size = 80 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-((a-b) x)+\frac {(a-b) \tan (e+f x)}{f}-\frac {(a-b) \tan ^3(e+f x)}{3 f}+\frac {(a-b) \tan ^5(e+f x)}{5 f}+\frac {b \tan ^7(e+f x)}{7 f} \]
-(a-b)*x+(a-b)*tan(f*x+e)/f-1/3*(a-b)*tan(f*x+e)^3/f+1/5*(a-b)*tan(f*x+e)^ 5/f+1/7*b*tan(f*x+e)^7/f
Time = 0.07 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.61 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {a \arctan (\tan (e+f x))}{f}+\frac {b \arctan (\tan (e+f x))}{f}+\frac {a \tan (e+f x)}{f}-\frac {b \tan (e+f x)}{f}-\frac {a \tan ^3(e+f x)}{3 f}+\frac {b \tan ^3(e+f x)}{3 f}+\frac {a \tan ^5(e+f x)}{5 f}-\frac {b \tan ^5(e+f x)}{5 f}+\frac {b \tan ^7(e+f x)}{7 f} \]
-((a*ArcTan[Tan[e + f*x]])/f) + (b*ArcTan[Tan[e + f*x]])/f + (a*Tan[e + f* x])/f - (b*Tan[e + f*x])/f - (a*Tan[e + f*x]^3)/(3*f) + (b*Tan[e + f*x]^3) /(3*f) + (a*Tan[e + f*x]^5)/(5*f) - (b*Tan[e + f*x]^5)/(5*f) + (b*Tan[e + f*x]^7)/(7*f)
Time = 0.40 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.84, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 4114, 3042, 3954, 3042, 3954, 3042, 3954, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (e+f x)^6 \left (a+b \tan (e+f x)^2\right )dx\) |
\(\Big \downarrow \) 4114 |
\(\displaystyle (a-b) \int \tan ^6(e+f x)dx+\frac {b \tan ^7(e+f x)}{7 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (a-b) \int \tan (e+f x)^6dx+\frac {b \tan ^7(e+f x)}{7 f}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle (a-b) \left (\frac {\tan ^5(e+f x)}{5 f}-\int \tan ^4(e+f x)dx\right )+\frac {b \tan ^7(e+f x)}{7 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (a-b) \left (\frac {\tan ^5(e+f x)}{5 f}-\int \tan (e+f x)^4dx\right )+\frac {b \tan ^7(e+f x)}{7 f}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle (a-b) \left (\int \tan ^2(e+f x)dx+\frac {\tan ^5(e+f x)}{5 f}-\frac {\tan ^3(e+f x)}{3 f}\right )+\frac {b \tan ^7(e+f x)}{7 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (a-b) \left (\int \tan (e+f x)^2dx+\frac {\tan ^5(e+f x)}{5 f}-\frac {\tan ^3(e+f x)}{3 f}\right )+\frac {b \tan ^7(e+f x)}{7 f}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle (a-b) \left (-\int 1dx+\frac {\tan ^5(e+f x)}{5 f}-\frac {\tan ^3(e+f x)}{3 f}+\frac {\tan (e+f x)}{f}\right )+\frac {b \tan ^7(e+f x)}{7 f}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle (a-b) \left (\frac {\tan ^5(e+f x)}{5 f}-\frac {\tan ^3(e+f x)}{3 f}+\frac {\tan (e+f x)}{f}-x\right )+\frac {b \tan ^7(e+f x)}{7 f}\) |
(b*Tan[e + f*x]^7)/(7*f) + (a - b)*(-x + Tan[e + f*x]/f - Tan[e + f*x]^3/( 3*f) + Tan[e + f*x]^5/(5*f))
3.2.91.3.1 Defintions of rubi rules used
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d *x])^(n - 1)/(d*(n - 1))), x] - Simp[b^2 Int[(b*Tan[c + d*x])^(n - 2), x] , x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Simp[(A - C) Int[(a + b*Tan[e + f*x])^m, x], x] /; FreeQ[{a , b, e, f, A, C, m}, x] && NeQ[A*b^2 + a^2*C, 0] && !LeQ[m, -1]
Time = 0.07 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.92
method | result | size |
norman | \(\left (-a +b \right ) x +\frac {\left (a -b \right ) \tan \left (f x +e \right )}{f}+\frac {b \tan \left (f x +e \right )^{7}}{7 f}-\frac {\left (a -b \right ) \tan \left (f x +e \right )^{3}}{3 f}+\frac {\left (a -b \right ) \tan \left (f x +e \right )^{5}}{5 f}\) | \(74\) |
parallelrisch | \(-\frac {-15 b \tan \left (f x +e \right )^{7}-21 a \tan \left (f x +e \right )^{5}+21 \tan \left (f x +e \right )^{5} b +35 \tan \left (f x +e \right )^{3} a -35 b \tan \left (f x +e \right )^{3}+105 a f x -105 b f x -105 \tan \left (f x +e \right ) a +105 b \tan \left (f x +e \right )}{105 f}\) | \(90\) |
derivativedivides | \(\frac {\frac {b \tan \left (f x +e \right )^{7}}{7}+\frac {a \tan \left (f x +e \right )^{5}}{5}-\frac {\tan \left (f x +e \right )^{5} b}{5}-\frac {\tan \left (f x +e \right )^{3} a}{3}+\frac {b \tan \left (f x +e \right )^{3}}{3}+\tan \left (f x +e \right ) a -b \tan \left (f x +e \right )+\left (-a +b \right ) \arctan \left (\tan \left (f x +e \right )\right )}{f}\) | \(91\) |
default | \(\frac {\frac {b \tan \left (f x +e \right )^{7}}{7}+\frac {a \tan \left (f x +e \right )^{5}}{5}-\frac {\tan \left (f x +e \right )^{5} b}{5}-\frac {\tan \left (f x +e \right )^{3} a}{3}+\frac {b \tan \left (f x +e \right )^{3}}{3}+\tan \left (f x +e \right ) a -b \tan \left (f x +e \right )+\left (-a +b \right ) \arctan \left (\tan \left (f x +e \right )\right )}{f}\) | \(91\) |
parts | \(\frac {a \left (\frac {\tan \left (f x +e \right )^{5}}{5}-\frac {\tan \left (f x +e \right )^{3}}{3}+\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {b \left (\frac {\tan \left (f x +e \right )^{7}}{7}-\frac {\tan \left (f x +e \right )^{5}}{5}+\frac {\tan \left (f x +e \right )^{3}}{3}-\tan \left (f x +e \right )+\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}\) | \(94\) |
risch | \(-a x +b x +\frac {2 i \left (315 a \,{\mathrm e}^{12 i \left (f x +e \right )}-420 b \,{\mathrm e}^{12 i \left (f x +e \right )}+1260 a \,{\mathrm e}^{10 i \left (f x +e \right )}-1260 b \,{\mathrm e}^{10 i \left (f x +e \right )}+2555 a \,{\mathrm e}^{8 i \left (f x +e \right )}-3080 b \,{\mathrm e}^{8 i \left (f x +e \right )}+3080 a \,{\mathrm e}^{6 i \left (f x +e \right )}-3080 b \,{\mathrm e}^{6 i \left (f x +e \right )}+2121 a \,{\mathrm e}^{4 i \left (f x +e \right )}-2436 b \,{\mathrm e}^{4 i \left (f x +e \right )}+812 a \,{\mathrm e}^{2 i \left (f x +e \right )}-812 b \,{\mathrm e}^{2 i \left (f x +e \right )}+161 a -176 b \right )}{105 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{7}}\) | \(179\) |
(-a+b)*x+(a-b)*tan(f*x+e)/f+1/7*b*tan(f*x+e)^7/f-1/3*(a-b)*tan(f*x+e)^3/f+ 1/5*(a-b)*tan(f*x+e)^5/f
Time = 0.25 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.86 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {15 \, b \tan \left (f x + e\right )^{7} + 21 \, {\left (a - b\right )} \tan \left (f x + e\right )^{5} - 35 \, {\left (a - b\right )} \tan \left (f x + e\right )^{3} - 105 \, {\left (a - b\right )} f x + 105 \, {\left (a - b\right )} \tan \left (f x + e\right )}{105 \, f} \]
1/105*(15*b*tan(f*x + e)^7 + 21*(a - b)*tan(f*x + e)^5 - 35*(a - b)*tan(f* x + e)^3 - 105*(a - b)*f*x + 105*(a - b)*tan(f*x + e))/f
Time = 0.20 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.36 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\begin {cases} - a x + \frac {a \tan ^{5}{\left (e + f x \right )}}{5 f} - \frac {a \tan ^{3}{\left (e + f x \right )}}{3 f} + \frac {a \tan {\left (e + f x \right )}}{f} + b x + \frac {b \tan ^{7}{\left (e + f x \right )}}{7 f} - \frac {b \tan ^{5}{\left (e + f x \right )}}{5 f} + \frac {b \tan ^{3}{\left (e + f x \right )}}{3 f} - \frac {b \tan {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right ) \tan ^{6}{\left (e \right )} & \text {otherwise} \end {cases} \]
Piecewise((-a*x + a*tan(e + f*x)**5/(5*f) - a*tan(e + f*x)**3/(3*f) + a*ta n(e + f*x)/f + b*x + b*tan(e + f*x)**7/(7*f) - b*tan(e + f*x)**5/(5*f) + b *tan(e + f*x)**3/(3*f) - b*tan(e + f*x)/f, Ne(f, 0)), (x*(a + b*tan(e)**2) *tan(e)**6, True))
Time = 0.31 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.90 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {15 \, b \tan \left (f x + e\right )^{7} + 21 \, {\left (a - b\right )} \tan \left (f x + e\right )^{5} - 35 \, {\left (a - b\right )} \tan \left (f x + e\right )^{3} - 105 \, {\left (f x + e\right )} {\left (a - b\right )} + 105 \, {\left (a - b\right )} \tan \left (f x + e\right )}{105 \, f} \]
1/105*(15*b*tan(f*x + e)^7 + 21*(a - b)*tan(f*x + e)^5 - 35*(a - b)*tan(f* x + e)^3 - 105*(f*x + e)*(a - b) + 105*(a - b)*tan(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 1011 vs. \(2 (74) = 148\).
Time = 3.43 (sec) , antiderivative size = 1011, normalized size of antiderivative = 12.64 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\text {Too large to display} \]
-1/105*(105*a*f*x*tan(f*x)^7*tan(e)^7 - 105*b*f*x*tan(f*x)^7*tan(e)^7 - 73 5*a*f*x*tan(f*x)^6*tan(e)^6 + 735*b*f*x*tan(f*x)^6*tan(e)^6 + 105*a*tan(f* x)^7*tan(e)^6 - 105*b*tan(f*x)^7*tan(e)^6 + 105*a*tan(f*x)^6*tan(e)^7 - 10 5*b*tan(f*x)^6*tan(e)^7 + 2205*a*f*x*tan(f*x)^5*tan(e)^5 - 2205*b*f*x*tan( f*x)^5*tan(e)^5 - 35*a*tan(f*x)^7*tan(e)^4 + 35*b*tan(f*x)^7*tan(e)^4 - 73 5*a*tan(f*x)^6*tan(e)^5 + 735*b*tan(f*x)^6*tan(e)^5 - 735*a*tan(f*x)^5*tan (e)^6 + 735*b*tan(f*x)^5*tan(e)^6 - 35*a*tan(f*x)^4*tan(e)^7 + 35*b*tan(f* x)^4*tan(e)^7 - 3675*a*f*x*tan(f*x)^4*tan(e)^4 + 3675*b*f*x*tan(f*x)^4*tan (e)^4 + 21*a*tan(f*x)^7*tan(e)^2 - 21*b*tan(f*x)^7*tan(e)^2 + 245*a*tan(f* x)^6*tan(e)^3 - 245*b*tan(f*x)^6*tan(e)^3 + 2205*a*tan(f*x)^5*tan(e)^4 - 2 205*b*tan(f*x)^5*tan(e)^4 + 2205*a*tan(f*x)^4*tan(e)^5 - 2205*b*tan(f*x)^4 *tan(e)^5 + 245*a*tan(f*x)^3*tan(e)^6 - 245*b*tan(f*x)^3*tan(e)^6 + 21*a*t an(f*x)^2*tan(e)^7 - 21*b*tan(f*x)^2*tan(e)^7 + 3675*a*f*x*tan(f*x)^3*tan( e)^3 - 3675*b*f*x*tan(f*x)^3*tan(e)^3 + 15*b*tan(f*x)^7 - 42*a*tan(f*x)^6* tan(e) + 147*b*tan(f*x)^6*tan(e) - 420*a*tan(f*x)^5*tan(e)^2 + 735*b*tan(f *x)^5*tan(e)^2 - 3150*a*tan(f*x)^4*tan(e)^3 + 3675*b*tan(f*x)^4*tan(e)^3 - 3150*a*tan(f*x)^3*tan(e)^4 + 3675*b*tan(f*x)^3*tan(e)^4 - 420*a*tan(f*x)^ 2*tan(e)^5 + 735*b*tan(f*x)^2*tan(e)^5 - 42*a*tan(f*x)*tan(e)^6 + 147*b*ta n(f*x)*tan(e)^6 + 15*b*tan(e)^7 - 2205*a*f*x*tan(f*x)^2*tan(e)^2 + 2205*b* f*x*tan(f*x)^2*tan(e)^2 + 21*a*tan(f*x)^5 - 21*b*tan(f*x)^5 + 245*a*tan...
Time = 11.76 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.88 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {\frac {b\,{\mathrm {tan}\left (e+f\,x\right )}^7}{7}+\left (\frac {a}{5}-\frac {b}{5}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^5+\left (\frac {b}{3}-\frac {a}{3}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^3+\left (a-b\right )\,\mathrm {tan}\left (e+f\,x\right )-f\,x\,\left (a-b\right )}{f} \]